package ru.tulupov.producerconsumerpattern;

import java.util.Observable;
import java.util.Observer;

public class ThreadManager extends Observable {
	private static class ThreadManagerHolder {
		public static final ThreadManager INSTANCE = new ThreadManager();
	}

	public static ThreadManager getInstance() {
		return ThreadManagerHolder.INSTANCE;
	}

	private ThreadManager() {

	}

	public void interruptAll(Observer observer) {
		deleteObserver(observer);
		setChanged();
		notifyObservers();
	}

}
